package com.designpattern.simplefactory.ordinary;

/**
 * @author Liusr
 * @date 2023/2/27
 * @package com.designpattern.simplefactory.ordinary
 * @Description: 除法操作类
 */
public class DivideOperator extends Operator {
	@Override
	public double getResult() {
		if (this.numberB == 0) {
			throw new IllegalArgumentException("除数不能为0");
		}
		return numberA / numberB;
	}
}
